export default {
    redirectRoutes(router) {
        router.beforeEach((to, from, next) => {
            if (to.matched.length === 0) return next({ name: 'Error404', replace: true });
            if (to.name === 'Root') return next({ name: 'Home', replace: true });

            next();
        });
    }
};
